RUN: rm -rf %t
RUN: mkdir %t
RUN: cd %t
RUN: cp %p/../Inputs/dwos_list_from_exec/a.dwo a.dwo
RUN: cp %p/../Inputs/dwos_list_from_exec/b.dwo b.dwo
RUN: cp %p/../Inputs/dwos_list_from_exec/c.dwo c.dwo
RUN: cp %p/../Inputs/dwos_list_from_exec/d.dwo d.dwo
RUN: cp %p/../Inputs/dwos_list_from_exec/e.dwo e.dwo
RUN: cp %p/../Inputs/dwos_list_from_exec/main main
RUN: cp %p/../Inputs/dwos_list_from_exec/libd.so libd.so
RUN: llvm-dwp c.dwo e.dwo -e main -e libd.so -o - | llvm-dwarfdump -v - | FileCheck %s

Build commands for the test binaries:

clang++ -Xclang -fdebug-compilation-dir -Xclang "./" -g -O0 -gsplit-dwarf a.cpp b.cpp -o main
clang++ -g -O0 -gsplit-dwarf -c c.cpp -o c.o
clang++ -Xclang -fdebug-compilation-dir -Xclang "./" -g -O0 -gsplit-dwarf -fPIC -shared d.cpp -o libd.so
clang++ -g -O0 -gsplit-dwarf -c e.cpp -o e.o

sources:
a.cpp:
  void a() {}

b.cpp:
  void b() {}
  int main() {
     return 0;
  }

c.cpp:
  void c() {}

d.cpp:
  void d() {}

e.cpp:
  void e() {}

CHECK-LABEL: .debug_abbrev.dwo contents:

CHECK-LABEL: Abbrev table for offset:
CHECK: DW_TAG_compile_unit
CHECK: DW_TAG_subprogram

CHECK-LABEL: Abbrev table for offset:
CHECK: DW_TAG_compile_unit
CHECK: DW_TAG_subprogram

CHECK-LABEL: Abbrev table for offset:
CHECK: DW_TAG_compile_unit
CHECK: DW_TAG_subprogram

CHECK-LABEL: Abbrev table for offset:
CHECK: DW_TAG_compile_unit
CHECK: DW_TAG_subprogram

CHECK-LABEL: Abbrev table for offset:
CHECK: DW_TAG_compile_unit
CHECK: DW_TAG_subprogram

CHECK: .debug_info.dwo contents:
CHECK: [[AOFF:0x[0-9a-f]*]]:

CHECK-LABEL: Compile Unit: length = {{.*}}, version = 0x0004
CHECK: DW_TAG_compile_unit
CHECK:   DW_AT_name {{.*}} "c.cpp"
CHECK:   DW_TAG_subprogram
CHECK:     DW_AT_name {{.*}} "c"

CHECK-LABEL: Compile Unit: length = {{.*}}, version = 0x0004
CHECK: DW_TAG_compile_unit
CHECK:   DW_AT_name {{.*}} "e.cpp"
CHECK:   DW_TAG_subprogram
CHECK:     DW_AT_name {{.*}} "e"

CHECK-LABEL: Compile Unit: length = {{.*}}, version = 0x0004
CHECK: DW_TAG_compile_unit
CHECK:   DW_AT_name {{.*}} "a.cpp"
CHECK:   DW_TAG_subprogram
CHECK:     DW_AT_name {{.*}} "a"

CHECK-LABEL: Compile Unit: length = {{.*}}, version = 0x0004
CHECK: DW_TAG_compile_unit
CHECK:   DW_AT_name {{.*}} "b.cpp"
CHECK:   DW_TAG_subprogram
CHECK:     DW_AT_name {{.*}} "b"
CHECK:   DW_TAG_subprogram
CHECK:     DW_AT_name {{.*}} "main"

CHECK-LABEL: Compile Unit: length = {{.*}}, version = 0x0004
CHECK: DW_TAG_compile_unit
CHECK:   DW_AT_name {{.*}} "d.cpp"
CHECK:   DW_TAG_subprogram
CHECK:     DW_AT_name {{.*}} "d"
